package com.pizza.control;

import java.io.Serializable;
import java.rmi.RemoteException;
import java.util.ArrayList;

import com.pizza.abstrait.AbstractArticle;
import com.pizza.database.PizzaManagerClient;

/**
 * Class ArticlesBean, bean pour la liste des articles.
 *
 */
public class ArticlesBean implements Serializable {
	
	protected ArrayList<AbstractArticle> tousArticles;

	protected ArrayList<AbstractArticle> articlesBoissons;

	protected ArrayList<AbstractArticle> articlesDesserts;

	protected ArrayList<ArticlesBean> articles;

	public ArticlesBean() {
		articles = new ArrayList<ArticlesBean>();
		articles.add(this);
		try {
			tousArticles = PizzaManagerClient.GetPizzaManager()
					.getListTousLesArticles();
			articlesBoissons = PizzaManagerClient.GetPizzaManager()
					.getListArticlesBoissons();
			articlesDesserts = PizzaManagerClient.GetPizzaManager()
					.getListArticlesDesserts();
		} catch (RemoteException e) {
			e.printStackTrace();
		}
	}

	public ArrayList getArticles() {
		return articles;
	}

	public void setArticles(ArrayList<ArticlesBean> articles) {
		this.articles = articles;
	}

	public ArrayList<AbstractArticle> getArticlesBoissons() {
		return articlesBoissons;
	}

	public void setArticlesBoissons(ArrayList<AbstractArticle> articlesBoissons) {
		this.articlesBoissons = articlesBoissons;
	}

	public ArrayList<AbstractArticle> getArticlesDesserts() {
		return articlesDesserts;
	}

	public void setArticlesDesserts(ArrayList<AbstractArticle> articlesDesserts) {
		this.articlesDesserts = articlesDesserts;
	}

	public ArrayList<AbstractArticle> getTousArticles() {
		return tousArticles;
	}

	public void setTousArticles(ArrayList<AbstractArticle> tousArticles) {
		this.tousArticles = tousArticles;
	}

}
